<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="multipart/form-data; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="css/Site.css" />
<link rel="stylesheet" href="css/zy.all.css" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/amazeui.min.css" />
<link rel="stylesheet" href="css/admin.css" />
</head>
<body>
	<!-- <div class="am-cf admin-main" style="padding-top: 0px;"> -->
		<!-- content start -->

		<div class="am-cf admin-main" style="padding-top: 0px;">
			<!-- content start -->
			<div class="admin-content">
				<div class="admin-content-body">

					<div class="am-g">
						<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8"></div>
						<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4"
							style="padding-top: 30px;">
							<form  action="/modifyCommodity" class="am-form am-form-horizontal"
								method="post" enctype="multipart/form-data">

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品编号</label>
									<div class="am-u-sm-9">
									<input style="display: none;" id="commodity_id" name="commodity_id" th:value="${commodity.commodity_id}" type="text" />
										<span th:text="${commodity.commodity_id}" 
											></span>
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品名称</label>
									<div class="am-u-sm-9">
										<input th:value="${commodity.commodity_name}"
											name="commodity_name" type="text" id="commodity_name"
											required placeholder="商品名称">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品名图片</label>
									<div class="am-u-sm-9">
										<input name="file" id="file" type="file" />
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品状态</label>
									<div class="am-u-sm-9">
									<span id="ww" th:text="${commodity.commodity_state}"></span>
										不可用<input name="commodity_state" type="radio" checked="true" value="2" /> 
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
										可用<input name="commodity_state" type="radio" value="1" />
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										价格</label>
									<div class="am-u-sm-9">
										<input th:value="${commodity.commodity_price}"
											name="commodity_price" type="text" id="commodity_price"
											required placeholder="价格">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										批发价格</label>
									<div class="am-u-sm-9">
										<input th:value="${commodity.commodity_tradeprice}"
											name="commodity_tradeprice" type="text"
											id="commodity_tradeprice" required placeholder="批发价格">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品数量</label>
									<div class="am-u-sm-9">
										<input th:value="${commodity.commodity_count}"
											name="commodity_count" type="text" id="commodity_count"
											required placeholder="商品数量">
									</div>
								</div>

								<div class="am-form-group">
									<label for="user-name" class="am-u-sm-3 am-form-label">
										商品类型</label>
									<div class="am-u-sm-9">
										<span id="dd" th:text="${commodity.commodity_type_id}"></span>
										<select class="types" id="commodity_type_id" name="commodity_type_id">
											<option value="0">===请选择===</option>
<!-- 											<option th:each="type:${commodity_type}" -->
<!-- 												th:value="${type.getCommoditytype_id()}" -->
<!-- 												th:text="${type.getCommoditytype_name()}"> -->
<!-- 												</option> -->
										</select>
									</div>
								</div>



								<div class="am-form-group">
									<div class="am-u-sm-9 am-u-sm-push-3">
										<input type="submit" class="am-btn am-btn-success" value="修改" />
										<a href="inventory"><input type="button"
											class="am-btn am-btn-success" value="返回" /></a>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
				<footer class="admin-content-footer">
					<hr>
					<p class="am-padding-left"></p>
				</footer>
			</div>
			<!-- content end -->
		</div>
		<!-- end-->
		<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="js/editcommodity.js"></script>
</body>
</html>
